﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AgentQltyView2.aspx.cs" Inherits="IHISCETeim.Web.AgentSys.SvrMgr.AgentQltyView2" %>

<div class="pageContent AgentQltyView2From<%=QltyId %>">
	<form method="post"  class="pageForm required-validate" >
		<div class="pageFormContent" layoutH="56">
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">1.基本信息</h2>
                    <div style="width:760px">
			            <p>
				            <label>品 情 号：</label>
				            <input name="ClaimsNumber" type="text" class="" readonly value="自动生成" />
			            </p>
			            <p>
				            <label>发行日期：</label>
				            <input name="IssueDate" class="required date" type="text" value="" alt=""/>
			            </p>
                        <div style="clear:both;"></div>
                        <label>服务担当：</label>
                        <input name="SvrInfo" type="text" class="" readonly style="width:300px" value="<%=GetSvrInfo()%>" />
                        
                    </div>
                    <div class="divider"></div>
                    <div style="float:left; width:760px" > 
			            <p>
				            <label>经 销 商：</label>
                            <input name="AgentName" type="text" readonly class="required textInput" value="" />
			            </p>
                        <p>
				            <label>机号：</label>
				            <input id="AddAgentQltySerialNumber" name="SerialNumber" class="required" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>用户：</label>
				            <input name="CustomerName" class="required" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>用户手机：</label>
				            <input name="CustomerMobile" class="required" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>交机日：</label>
				            <input name="IntoDate" class="date" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>地点：</label>
				            <input name="IntoAddress" class="" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>故障日：</label>
				            <input name="FaultDate" class="date required" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>机型：</label>
				            <input name="MachineType" class="" type="text"  value="" alt=""/>
			            </p>
                        <p>
				            <label>工作小时：</label>
				            <input name="WorkHour" class="required" type="text"  value="0" alt=""/>
			            </p>
                        <p>
				            <label>报告人：</label>
				            <input name="ReportUser" class="" type="text"  value="" alt=""/>
			            </p>
                         <p>
				            <label>联系电话：</label>
				            <input name="ReportTel" class="" type="text"  value="" alt=""/>
			            </p>
                         <p>
				            <label>损坏部品序列号或钢号：</label>
				            <input name="DamagePartsNumber" class="" type="text"  value="" alt=""/>
			            </p>
                    </div>
                    <div style="float:left;width:380px; padding:5px 0px;" class="uwarrantycardInfo">
                         <p>
                             <label>机器性质：</label>
                             <input name="MacNature" class="" type="text"  value="" alt=""/>                            
                        </p>
                        <p>
                             <label>作业内容：</label>
                             <input name="IntoConditi" class="" type="text"  value="" alt=""/>  
                             
                        </p>
                        <p>
                             <label>特别附件及规格：</label>
                            <input name="IntoSpecial" class="" type="text"  value="" alt=""/>
                        </p>
                    </div>
                 <div style="clear:both;"></div>
                 <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6; clear:both; margin-top:15px;">2.故障信息</h2>
                    
                    <div style="float:left; width:380px; margin-right:10px;"> 
                        <label style="width:250px!important;">故障描述(工况、故障部位、故障现象)：</label>
                        <div style="clear:both;margin-bottom: 5px;"></div>
				        <textarea name="FaultDescription" style="height:205px; width:375px;" ></textarea>

                        <div style="clear:both;margin-bottom: 5px;"></div>
                        <label style="width:250px!important;">故障推定原因：</label>
                        <div style="clear:both;margin-bottom: 5px;"></div>
				        <textarea name="FaultReason"  style="height:205px; width:375px;" ></textarea>

                        <label style="width:250px!important;">结论：</label>
                        <div style="clear:both;margin-bottom: 5px;"></div>
				        <textarea name="ProcessMode" style="height:265px; width:375px;" ></textarea>
                    </div>
                    <div style="float:left;width:445px;">
                        <label style="width:250px!important;">故障描述(工况、故障部位、故障现象)：</label>
                        <div style="clear:both;margin-bottom: 5px;"></div>
                         <asp:repeater id="rpImgs" runat="server">                    
                            <ItemTemplate>
                                <div style="float:left; height:170px; width:210px; margin-bottom:25px;">
                                    <img  src="<%# GetSmallPic(Eval("IMGRelatively").ToString())%>"  Width="200" Height="150"/>                                                                   
                                    <div style="clear:both;margin-bottom:2px;"></div>                                   
                                    <input type="text" style="width:200px" value="<%# Eval("Title")%>" />                         
                                </div>
                            </ItemTemplate>
                        </asp:repeater>

                        <div style="height:2px; clear:both; margin-bottom:15px;"></div>
                        <div style=" width:210px;">
                           <asp:hyperlink runat="server" id="otherFileDownLoad" >其它文件下载</asp:hyperlink>
                        </div>
                    </div>
                <div style="clear:both;"></div>
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6; clear:both; margin-top:15px;">3.部品需求(只有填写配件号的行才会被保存)</h2>
                    <div style="padding:5px 0px; margin-bottom:5px;">
                             <p>
				                <label>部品收件人：</label>
				                <input name="PartsAcceptName" class="" type="text"  value="" alt=""/>
			                </p>
                            <p>
				                <label>联系电话：</label>
				                <input name="PartsAcceptTel" class="" type="text"  value="" alt=""/>
			                </p>
                           <p>
				                <label>期望到货时间：</label>
				                <select name="PartsAcceptDate">
                                    <option value="">请选择...</option>
                                    <option value="1-2天">1-2天</option>
                                    <option value="2-3天">2-3天</option>
                                    <option value="3天-1周">3天-1周</option>
                                    <option value="1周以上">1周以上</option>                                   
				                </select>
			                </p>
                          <div style="clear:both;"></div>
				            <label>部品收货地址：</label>
				            <input  name="PartsAcceptAddress" class="" type="text" size="100"  value="" alt=""/>
			       </div>
                    <div style="clear:both; "></div>
                    <table class="list"  style="width:100%" >
                       <thead>
                         <tr>                                    
                                    <th width="150px">配件号</th>
                                    <th width="150px">配件名</th>
                                    <th width="150px">数量</th>
                                    <th width="250px">配件需求</th>
                          </tr>                                
                        </thead>
                        <tbody>
                        <asp:repeater id="rpParts" runat="server">                    
                            <ItemTemplate>
                                 <tr>                                  
                                     <td>
                                         <input type="text" name="ItemCode" value="<%# Eval("ItemCode")%>" />
                                        
                                     </td>
                                     <td>
                                         <input type="text"  name="Dscription" value="<%# Eval("Dscription")%>"/>

                                     </td>
                                     <td><input type="text" name="Quantity" value="<%# Eval("Quantity")%>"/></td>
                                     <td>
                                         <input type="text" name="PartsDemand" value="<%# Eval("PartsDemand")%>"/>                                        
                                     </td>
                                 </tr>
                             </ItemTemplate>                           
                        </asp:repeater>
                        </tbody>
                      </table>
                
                <div style="clear:both;"></div>
                <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6; clear:both; margin-top:15px;">4.IHISCE服务担当处理</h2>
                    <p>
				          <label>报告类型：</label>
                          <input name="ReportType" type="text" readonly  />
			        </p>
                    <p>
				          <label>是否需要一周回访：</label>
                          <input name="IsVisit" type="checkbox"   />
			        </p>
                    <div style="clear:both;"></div>
                    <label style="width:250px!important;">IHISCE服务部品情回复、对策与结果：</label>
                    <div style="clear:both;margin-bottom: 5px;"></div>
				        <textarea name="SvrResult" style="height:250px; width:350px; float:left;"  ></textarea>
                
                        <div style="float:left;margin:0px 15px;">
                             <asp:repeater id="SvrResultImgrp" runat="server">                    
                                <ItemTemplate>
                                    <div style="float:left; height:170px; width:210px; margin-bottom:25px;">
                                        <img  src="<%# GetSmallPic(Eval("IMGRelatively").ToString())%>"  Width="200" Height="150"/>                                                                   
                                        <div style="clear:both;margin-bottom:2px;"></div>                                   
                                        <input type="text" style="width:200px" value="<%# Eval("Title")%>" />                         
                                    </div>
                                </ItemTemplate>
                            </asp:repeater>

                            <div style="height:2px; clear:both; margin-bottom:15px;"></div>
                            <div style=" width:210px;">
                               <asp:hyperlink runat="server" id="SvrResultImg3HL" >其它文件下载</asp:hyperlink>
                            </div>
                        </div>
                    <div style="clear:both;margin-bottom: 5px;"></div>
                    <p>
				        <label>配件发送日期：</label>
                        <input name="PartsSendDate" type="text"   />
			         </p>
                    <p>
				        <label>配件发送方式：</label>
                        <input name="PartsSendType" type="text"   />
			         </p>
                    <div style="clear:both;">驳回记录:</div>
                     <table class="list"  style="width:100%" >
                       <thead>
                         <tr>                                    
                                    <th width="150px">驳回时间</th>
                                    <th width="150px">驳回人</th>
                                    <th >驳回原因</th>
                          </tr>                                
                        </thead>
                        <tbody>
                        <asp:repeater id="rpReject" runat="server">                    
                            <ItemTemplate>
                                 <tr>                                  
                                     <td>
                                         <%# Eval("RejectDate")%>                                  
                                     </td>
                                     <td>
                                         <%# Eval("RejectRealName")%>
                                     </td>
                                     <td><%# Eval("RejectReason")%></td>
                                 </tr>
                             </ItemTemplate>                           
                        </asp:repeater>
                        </tbody>
                      </table>
		</div>
		<div class="formBar">
			<ul>				
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        var $Qltyjson = eval(<%= Newtonsoft.Json.JsonConvert.SerializeObject(obj)%>);
        //alert($Qltyjson.QltyId)
        var $dateColumn = "IssueDate,IntoDate,FaultDate"
        for (var itm in $Qltyjson) {
            var $val = $Qltyjson[itm];
            if ($dateColumn.indexOf(itm) >= 0)
                if ($dateColumn.indexOf(itm) >= 0) {
                    //$val = formatterdate($Qltyjson[itm]);
                    $val = $Qltyjson[itm].replace("T", " ").substring(0, 16);
                }
            if ($(".AgentQltyView2From<%=QltyId %>").find("[name='" + itm + "']").is(":checkbox"))
                $(".AgentQltyView2From<%=QltyId %>").find("[name='" + itm + "']").attr("checked", $val);
            else
                $(".AgentQltyView2From<%=QltyId %>").find("[name='" + itm + "']").val($val);

        }
    })
</script>
